<?php

namespace part16_StateMode\Code4;

require_once '../../autoload.php';

$work = new Work();


$work->setHour(9);
$work->writeProgram();
$work->setHour(10);
$work->writeProgram();
$work->setHour(12);
$work->writeProgram();
$work->setHour(13);
$work->writeProgram();
$work->setHour(14);
$work->writeProgram();
$work->setHour(17);
$work->writeProgram();

// 任务完成就能下班，否则就得加班
$work->setFinished(false);
$work->setHour(19);
$work->writeProgram();
$work->setHour(22);
$work->writeProgram();